home *** CD-ROM | disk | FTP | other *** search
/ The Sunday Times: Parent Power / The Sunday Times - Parent Power.iso / pc / engine / exit.swf / scripts / frame_1 / DoAction.as
Encoding:
Text File  |  2005-11-03  |  1015 b   |  46 lines

  1. function interrupt()
  2. {
  3.    _parent.header.footer_mc.gotoAndStop(1);
  4.    _parent.header.mcDisabler._visible = false;
  5.    clearInterval(showExitBtnID);
  6.    clearInterval(countdownID);
  7. }
  8. function startCountdown()
  9. {
  10.    nmSeconds = nmStartSeconds = 10;
  11.    countdownID = setInterval(this,"countdown",1000);
  12.    showExitBtnID = setInterval(this,"showExitBtn",4000);
  13. }
  14. exit_btn._alpha = 50;
  15. exit_btn.enabled = false;
  16. _parent.header.footer_mc.gotoAndStop(2);
  17. startCountdown();
  18. countdown = function()
  19. {
  20.    nmSeconds--;
  21.    if(nmSeconds == 5)
  22.    {
  23.       showExitBtn();
  24.    }
  25.    else if(nmSeconds == 0)
  26.    {
  27.       clearInterval(countdownID);
  28.       getUrl("lingo: quit", "");
  29.    }
  30. };
  31. showExitBtn = function()
  32. {
  33.    exit_btn.enabled = true;
  34.    exit_btn._alpha = 100;
  35.    clearInterval(showExitBtnID);
  36. };
  37. exit_btn.onRelease = function()
  38. {
  39.    getUrl("lingo: quit", "");
  40. };
  41. books_btn.onRelease = function()
  42. {
  43.    this._parent.interrupt();
  44.    this._parent._parent.movie_load("added_value.swf");
  45. };
  46.